<template>
	<view>
		测试
	</view>
	<view class="">
		<button @click="push">点击跳转</button>
	</view>
	<view class="">
		获取pinia数据
		{{store.count}}----{{store.obj.name}}-----{{store.obj.age}}----{{store.doubleCount}}
	</view>
	<!-- 获取pinia中的方法 -->
	<button @click="store.add">点击</button>
	<button @click="store.sub">点击两秒后改变123</button>
</template>

<script setup>
	import {onLoad} from "@dcloudio/uni-app"
	import request from "@/utils/request.js"
	
	//导出count-store函数
	import {useCount} from '@/stores/count.js'
	
	//获取store数据
	const store=useCount()
// import { onMounted } from "vue";
	// onLoad(async()=>{
	// 	const res=await request.get('/driver/users')
	// 	console.log(res);
		
	// })
	onLoad(()=>{
		uni.utils.message('成功')
	})
	
	
	const push=()=>{
		uni.utils.push('/pages/index/index')
	}
	
</script>

<style>

</style>
